package com.health.healthproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.health.healthproject.dto.AnnouncementDTO;
import com.health.healthproject.entity.Announcement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AnnouncementMapper extends BaseMapper<Announcement> {
    Page<AnnouncementDTO> selectByPage(Page<AnnouncementDTO> page,
                                       @Param("status") Integer status,
                                       @Param("title") String title,
                                       @Param("userId")Long userId,
                                       @Param("startTime") String startTime,
                                       @Param("endTime") String endTime);

    List<AnnouncementDTO> selectLatest();
}